package net.lab1024.sa.base.module.support.message.domain;

import lombok.Data;
import net.lab1024.sa.base.common.domain.PageParam;
import net.lab1024.sa.base.common.validator.enumeration.CheckEnum;
import net.lab1024.sa.base.module.support.message.constant.MessageTypeEnum;
import org.hibernate.validator.constraints.Length;

import java.time.LocalDate;

/**
 * 消息查询form
 *
 * @author luoyi
 * @date 2024/06/22 20:20
 */
@Data
public class MessageQueryForm extends PageParam {

    // 搜索词
    @Length(max = 50, message = "搜索词最多50字符")
    private String searchWord;

    // 枚举字段
    @CheckEnum(value = MessageTypeEnum.class, message = "消息类型")
    private Integer messageType;

    // 是否已读
    private Boolean readFlag;

    // 查询开始时间
    private LocalDate startDate;

    // 查询结束时间
    private LocalDate endDate;

    // 接收人
    private Long receiverUserId;

    // 接收人类型
    private Integer receiverUserType;
}
